<template>
  <el-dialog
    v-model="dialogVisible"
    title="新增分类"
    width="30%"
    :before-close="handleClose"
  >
    <el-row style="margin-top: 20px">
      <el-col :span="24">
        <span style="width: 100px" class="demonstration">新增分类：</span>
        <el-input
          placeholder="填写分类名称"
          v-model="input2"
          class="form-search-input"
        >
        </el-input>
      </el-col>
    </el-row>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">关闭</el-button>
        <el-button type="primary" @click="editSubmit()">提交</el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup>
const props = defineProps(['dialogVisible'])
const emits = defineEmits(['editSubmitEmit', 'handleCloseEmits'])
const input2 = ref('')
const editSubmit = () => {
  emits('editSubmitEmit', input2)
}
const handleClose = (dialogVisible) => {
  dialogVisible = false
  emits('handleCloseEmits', dialogVisible)
}
</script>

<style lang="scss" scoped></style>
